package cn.tedu._03vehicle.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
public class UserRegParam {
    @NotNull
    @Pattern(regexp = "^([\\u4e00-\\u9fa5]{7}|[a-zA-Z]{14})$",message = "用户名格式错误")
    @Schema(description = "用户名",required = true)
    private String username;
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)(?![^a-zA-Z0-9]+$)[^\\s\\u4e00-\\u9fa5]{8,14}$",message = "密码格式错误")
    @Schema(description = "密码",required = true)
    private String password;
    @Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",message = "邮箱格式错误")
    @Schema(description = "邮箱",required = true)
    private String email;
    @Pattern(regexp = "^1[3-9]\\d{9}$",message = "手机号码格式错误")
    @Schema(description = "手机号码",required = true)
    private String phone;
}
